export{}

class Person {
    public name: string
    public sayHello() {
        console.log(this.name + 'sayHello');
    }
}

// public private protected
// private 不允许继承和外部使用
// protected 不允许外部使用，允许继承

class Teacher extends Person {
    public sayBye() {
        console.log(this.name + 'sayBye');
    }
}

const person = new Person()
person.name = 'anzia'
person.sayHello()
console.log(person.name);